typedef struct student{
    char *name;
    int age;
    float score;
}student;

#define DATATYPE student
#include"linklist.h"

void show_student_info(student someone){
    printf("姓名:%s\t年龄:%d\t\t分数:%.1f\n", someone.name, someone.age, someone.score);
}

void assign(student *p1, const student *p2){
   *p1 = *p2;
}

int main(int argc, char const *argv[])
{
    dlinklist head = init_list();

    student jack = {"jack", 22, 80};
    student rose = {"rose", 20, 78};
    student mike = {"mike", 23, 85};

    list_add_tail(head, my_new_node(jack));
    list_add_tail(head, my_new_node(rose));
    list_add_tail(head, my_new_node(mike));

    list_for_each(head, show_student_info);
    return 0;
}
